﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zatify.Domain.Abstract;
using Zatify.Domain.Entities.Metadata;
using System.ComponentModel.DataAnnotations;

namespace Zatify.Domain.Data
{
    [MetadataType(typeof(SystemUserMetadata))]
    public partial class SystemUser : IZatifyUser
    {
        private UserRole _userRole;
        public UserRole UserRole
        {
            get
            {
                switch (this.Role)
                {
                    case "ADMIN":
                        return Abstract.UserRole.SystemAdmin;
                    case "USER":
                    default:
                        return Abstract.UserRole.SystemUser;
                }
            }
            set { this._userRole = value; }
        }
        public Guid? SecurityToken { get { return null; } }
        public String ZipCode { get; set; }

        public Double TimeZoneOffset { get; set; }
        public Boolean RememberUser { get; set; }
    }
}
